package study.ct.com.retrofit_rxjava.net.Cases;

import java.util.List;

import retrofit2.http.GET;
import rx.Observable;
import study.ct.com.retrofit_rxjava.net.Cases.base.UseCase;
import study.ct.com.retrofit_rxjava.net.models.City;

/**
 * Created by ct on 2017/10/11 0011.
 */

public class GetCitiesCase extends UseCase<GetCitiesCase.Api> {

    interface Api {
        @GET("api/china/")
        Observable<List<City>> getCitiesCase();
    }


    public Observable<List<City>> getCities() {
        return ApiClient().getCitiesCase()
                .compose(this.<List<City>>normalSchedulers());
    }

}